package study.java.jvm.support.utils;

import lombok.extern.slf4j.Slf4j;

import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.util.List;

@Slf4j
public class GCUtils {

    public static void garbageCollector() {
        List<GarbageCollectorMXBean> gcLt = ManagementFactory.getGarbageCollectorMXBeans();
        for (GarbageCollectorMXBean gc : gcLt) {
            log.info(gc.getName());
        }
    }
}
